<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="stylesheet" href="/assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="/assets/editormd/css/editormd.css">
    <script src="/assets/js/bootstrap.min.js"></script>

    <title>添加博客</title>
  </head>
  <body>

    <div class="container">
      {{template "header"}}


      <form action="/post" method="post">
        <div class="row">
          
            <div class="col-md-8">
              <div id="test-editormd">
                <textarea style="display:none;" name="content"></textarea>
              </div>    
            </div>

            <div class="col-md-4 mt-3">
              <label for="title" class="form-label">请输入标题</label>
              <input type="text" name="title" class="form-control" id="title"><br>

              <label for="tag" class="form-label">请输入标签</label>
              <input type="text" name="tag"  class="form-control" id="tag"><br>
              
              <button type="submit" class="btn btn-primary">添加</button>
            </div>
            
        </div>
      </form>

    </div>
    <script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="/assets/editormd/editormd.min.js"></script>
    <script type="text/javascript">
      var testEditor;
      $(function() {
          testEditor = editormd("test-editormd", {
              width   : "100%",
              height  : 450,
              syncScrolling : "single",
              path    : "assets/editormd/lib/",
              watch : false,
          });
      });
    </script>
  </body>
</html>